-
Notifications
You must be signed in to change notification settings - Fork 154
Set the vterm buffer's major mode before displaying the buffer. #758
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
|
Hi! I have some rules in my display-buffer-alist that inspect buffer properties such as major-mode. When my rules weren't correctly catching the vterm buffer on initial creation, but were catching it on subsequent displays, I looked into the reason why. I doubt other people have a similar issue, and it's easy enough for me to work around it. But here's hoping that this change is small enough that "consistency with other Emacs libraries" is sufficient reason to accept it. |
|
This makes sense to me. Would you be able to point me to the equivalent code for some of the other modes you mentioned? |
|
Sorry for the delayed response here. I've linked to the relevant lines (in emacs 29.4) for the other modes below:
|
I would help to add this explanation to the commit for anyone reviewing the commit history. |
This ensures that display-buffer actions that condition on a buffer's major mode (see the documentation of `display-buffer-alist` and `buffer-match-p`) properly catch the buffer when it is displayed for the first time. This aligns with the behavior of other terminal emulator modes (e.g. term and ansi-term) and comint-derived modes (e.g. ielm, SQLi, and inferior Python).
6cf7aac to
d4a0312
Compare
|
@Thaodan done. |
|
Great, thanks!
|
|
Friendly bump. Any objections to merging this? |
This aligns with the behavior of other terminal emulator modes (e.g. term and ansi-term) and comint-derived modes (e.g. ielm, SQLi, and inferior Python).